﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
using Mes.Pendant.MaterialTypes;
using Mes.Pendant.MaterialTypeService.Dto;
using Volo.Abp.Application.Services;

namespace Mes.Pendant.MaterialTypeService.Services
{
	public interface IMaterialTypeServices : IApplicationService
	{
		/// <summary>
		/// 新增物料类型
		/// </summary>
		/// <param name="insertMaterialTypedto"></param>
		/// <returns></returns>
		Task<int> AddMaterialtype(InsertMaterialTypedto insertMaterialTypedto);
		/// <summary>
		/// 获取物料产品树
		/// </summary>
		/// <returns></returns>
		List<MaterialtypeTreedto> GetMaterialtypeTreedtoList(int orderby);
		/// <summary>
		/// 根据ID获取物料型号
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		MaterialtypeTreedto GetMaterialtypeById(int id);
		/// <summary>
		/// 点击树形节点获取节点id和子集id
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		Task<string> GetNumarr(int id);
		/// <summary>
		/// 获取树形节点子集(递归方法)
		/// </summary>
		/// <param name="list"></param>
		/// <param name="orderby"></param>
		/// <returns></returns>
		Task<string> Getdoublearr(List<MaterialType> list, int orderby);

		/// <summary>
		/// 物料产品分类显示
		/// </summary>
		/// <param name="page">当前页</param>
		/// <param name="limit">每页显示的条数</param>
		/// <param name="materialTypeName">分类名称</param>
		/// <returns>物料产品分类显示列表</returns>
		Task<PagedResult> GetMaterialTypeList(int page, int limit,string? materialTypeName);
		Task<List<MaterialTypeListDto>> GetMaterialTypeTreeTable(string? materialTypeName);
		Task<int> AddMaterialType(AddMaterialTypeDto addMaterialTypeDto);
		Task<int> RemoveMaterialTypeById(int id);
		Task<EditMaterialTypeDto > FindMaterialType(int id);
		Task<int> UpdateMaterialType(EditMaterialTypeDto editMaterialTypeDto);






	}
}
